package com.itheima.mapper;

import com.itheima.domain.Student;
import lombok.Data;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

public interface StudentMapper {
    @Insert("INSERT INTO student(id, name, age, address,gender, phone,birthday) values (null,#{name},#{age},#{address},#{gender},#{phone},#{birthday}) ")
    void insertStudent(Student student);
    @Update("update student set name=#{name},age=#{age},address=#{address},gender=#{gender},phone=#{phone},birthday=#{birthday} where id=#{id}")
    void updateStudent(Student student);
    @Delete("delete from student where id=#{id}")
    void deleteStudent(Integer id);
}
